package 力扣_链表.基础操作;

/**
 * @author zx
 * @create 2022-08-15 15:31
 */
public class 链表的中间结点_876 {
    public ListNode middleNode(ListNode head) {
        ListNode fast = head;
        ListNode slow = head;
        while(fast != null && fast.next != null){
            fast = fast.next.next;
            slow = slow.next;
        }
        return slow;
    }
}
